#include "Pipe.h"


Pipe::Pipe(float posX, float posY, float width, float height, Resources* res, int kind, int number, int depth)
:GameObject(posX, posY, width, height, res, number, depth)
{
	switch (kind)
	{
	case ID::ID_Pipe1:
		_id = ID::ID_Pipe1;
		_sprite = new Sprite(_resources->Pipe1, 1, 1, 1);
		break;
	case ID::ID_Pipe2:
		_id = ID::ID_Pipe2;
		_sprite = new Sprite(_resources->Pipe2, 1, 1, 1);
		break;
	case ID::ID_Pipe3:
		_id = ID::ID_Pipe3;
		_sprite = new Sprite(_resources->Pipe3, 1, 1, 1);
		break;
	case ID::ID_PipeSpecial:
		_id = ID::ID_PipeSpecial;
		_sprite = new Sprite(_resources->Pipe3, 1, 1, 1);
		break;
	default:
		break;
	}

	_isStatic = true;

}


Pipe::~Pipe()
{

}

void Pipe::Render(LPD3DXSPRITE spriteHandler, Viewport* viewport)
{
	_sprite->Render(spriteHandler, _pos_x, _pos_y, false, viewport);
}
